package com.googlecode.linkmein.domain;

public class Resource {
    private Name name;
    private String role;
    public static final Resource NULL = new NullResource();
    private Project project;

    public Resource(Name name, String role, Project project) {
        this.name = name;
        this.role = role;
        this.project = project;
    }

    public Name getName() {
        return name;
    }

    public String toString() {
        return String.format("[%s] [%s] [%s]", name, role, project) + "\n";
    }

    public boolean isSameOne(Contact contact) {
        return name.equals(contact.name);
    }

    public String getRole() {
        return role;
    }

    public Project getProject() {
        return project;
    }
}
